FROM openjdk:8-jdk
MAINTAINER dcy "1540770111@qq.com"
COPY target/auth-center.jar /app.jar
RUN sh -c 'touch /app.jar'
VOLUME /tmp
EXPOSE 13001
# 修改spring环境变量
ENV JAVA_OPTS=""

# skywalking 链路追踪地址
ENV BACKEND_SERVICE="oap:11800"

#ENV JAVA_OPTS="-Dspring.profiles.active=test"

ENTRYPOINT [ "sh", "-c", "java -javaagent:/opt/agent/skywalking-agent.jar \
-Dskywalking.agent.service_name=auth-center \
-Dskywalking.collector.backend_service=$BACKEND_SERVICE \
$JAVA_OPTS -Djava.security.egd=file:/dev/./urandom -jar /app.jar" ]